<?include_once('template.php');?>

<html>
<?
	$draft = getDraft($_SESSION['team']->draftID);
	$teamOnClock = getPickingTeam($draft);
	echo getHeader();
?>

<body>
	<?echo getToolbar($draft, $ie, 3);?>
	<div class="container-fluid">
		<?//echo getNavBar($draft);?>
		<div class='sidebar'>
			<?$teams = getAllTeamsInDraft($draft->id);?>
			<div class='page-header'><h2>Draft Order</h2></div>
			<table>
				<thead>
					<th>Team</th>
					<th>#</th>
				</thead>
				<tbody>
					<?
						foreach($teams as $t)
						{
							if ($t->equals($teamOnClock))
							{
								echo $t->asOrderRow(true);
							}
							else
							{
								echo $t->asOrderRow(false);
							}
						}
					?>
				</tbody>
			</table>
		</div>
		<div class="content">
			<?echo getClockMessage($teamOnClock);?>
			<?$selections = getRecentSelections(-1, $draft->id);?>
			<div class='page-header draftStat'><h2>All Selections</h2></div>
			<table>
				<thead>
					<th>#</th>
					<th>Player</th>
					<th>Team</th>
					<th>Time</th>
				</thead>
				<tbody>
					<?
						foreach($selections as $s)
						{
							echo $s->getRowView();
						}
					?>
				</tbody>
			</table>
		</div>
	</div>
</body>
</html>
			